#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT(fsgraph, 1.0, morria@cs.rpi.edu)
AC_CONFIG_SRCDIR([fsgraph.c])
AC_CONFIG_HEADER([config.h])

AM_INIT_AUTOMAKE

# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB

GRAPHLIB_DIR=`pwd`/graphpack-1.0/src
AC_SUBST(GRAPHLIB_DIR)

AC_ARG_WITH(www-lib,
	AC_HELP_STRING([--with-www-lib=<path>],[prefix of w3c-libwww]),
	[WWW_LIB=$with_www-lib],
	[WWW_LIB="/usr/local/include/w3c-libwww"])
AC_SUBST(WWW_LIB)

# Checks for libraries.

# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h sys/param.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_LSTAT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MALLOC
AC_CHECK_FUNCS([getcwd])

AC_CONFIG_FILES([
	graphpack-1.0/Makefile
	graphpack-1.0/src/Makefile
	Makefile])
AC_OUTPUT
